#include <stdio.h>
#include <unistd.h>
#include <sys/types.h>
int glob = 10;

int main()
{
    int local = 8;
    pid_t pid = fork();
    if (pid == 0)
    {
        sleep(1);
        printf("Child:  glob=%d, local=%d\n", glob, local);
    }
    else
    {
        glob++;
        local--;
        printf("Parent: glob=%d, local=%d\n", glob, local);
    }
    return 0;
}